<template>
	<el-drawer title="客户信息详情" v-model="visible" :size="800" destroy-on-close @closed="$emit('closed')">
		<el-container v-loading="loading">
			<el-main>
				<el-form>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="排序号" prop="sortNo">{{form.sortNo}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="客户编号" prop="customerCode">{{form.customerCode}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="客户名称(Cn)" prop="cnName">{{form.cnName}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="客户名称(En)" prop="enName">{{form.enName}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="客户等级" prop="level">{{form.levelName}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="客户来源" prop="source">{{form.sourceName}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="企业类型" prop="customerType">{{form.customerTypeName}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="企业性质" prop="nature">{{form.natureName}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="所属行业" prop="industry">{{form.industryName}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="当前阶段" prop="selStage">{{form.selStageName}}
							</el-form-item>
						</el-col>
					</el-row>

					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="客户画像" prop="userPortrait">{{form.userPortraitName}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="需求产品" prop="focusProduct">{{form.focusProductName}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="合作意向" prop="intention">
								<el-tag type="success" v-if="form.intention=='1'">强烈</el-tag>
								<el-tag type="warning" v-else-if="form.intention=='2'">一般</el-tag>
								<el-tag type="info" v-else>暂无可能</el-tag>
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="竞争对手" prop="opponent">{{form.opponent}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="统一信用代码" prop="creditCode">{{form.creditCode}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="注册资本" prop="registerCapital">{{form.registerCapital}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="注册日期" prop="registerDate">{{form.registerDate}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="营业期限" prop="timeOfVaildity">{{form.timeOfVaildity}}
							</el-form-item>
						</el-col>
					</el-row>

					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="企业法人" prop="legalPerson">{{form.legalPerson}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="经营状态" prop="businessStatus">{{form.businessStatusName}}
							</el-form-item>
						</el-col>
					</el-row>

					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="企业电话" prop="tel">{{form.tel}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="企业传真" prop="fax">{{form.fax}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-row :gutter="24">
						<el-col :lg="12">
							<el-form-item label="企业邮件" prop="eMail">{{form.eMail}}
							</el-form-item>
						</el-col>
						<el-col :lg="12">
							<el-form-item label="企业网站" prop="webSite">{{form.webSite}}
							</el-form-item>
						</el-col>
					</el-row>
					<el-form-item label="客户简介" prop="remark">{{form.remark}}
					</el-form-item>
				</el-form>
				<el-footer style="text-align: center;">
					<el-button @click="visible=false">关闭</el-button>
				</el-footer>
			</el-main>
		</el-container>
	</el-drawer>
</template>

<script>
export default {
	emits: ['success', 'closed'],
	components: {
	},
	data() {
		return {
			loading: false,
			form: {
				customerId:'',
				sortNo:0,
				customerCode:"",
				cnName: '',
				enName: '',
				levelName: '',
				source:'',
				customerTypeName:'',
				natureName:'',
				industryName:'',
				selStageName: '',
				userPortraitName: '',
				focusProductName:"",
				intention:"2",
				opponent:"",
				creditCode:"",
				registerCapital:"",
				registerDate:"",
				timeOfVaildity:"",
				legalPerson:"",
				businessStatusName:"",
				tel:"",
				fax:"",
				eMail:"",
				webSite:"",
				remark:'',
			},
			visible: false,
			isSaveing: false,
		}
	},
	mounted() {

	},
	methods: {
		//显示
		open(model){
			this.model=model;
			this.visible = true;
			return this;
		},
		//表单注入数据
		setData(data){
			this.form.customerId = data.customerId
			this.form.sortNo = data.sortNo
			this.form.customerCode = data.customerCode
			this.form.cnName = data.cnName
			this.form.enName = data.enName
			this.form.levelName = data.levelName
			this.form.sourceName = data.sourceName
			this.form.customerTypeName = data.customerTypeName
			this.form.natureName = data.natureName
			this.form.industryName = data.industryName
			this.form.selStageName = data.selStageName
			this.form.userPortraitName = data.userPortraitName
			this.form.focusProductName = data.focusProductName
			this.form.intention = data.intention
			this.form.opponent = data.opponent
			this.form.creditCode = data.creditCode
			this.form.registerCapital = data.registerCapital
			this.form.registerDate = data.registerDate
			this.form.timeOfVaildity = data.timeOfVaildity
			this.form.legalPerson = data.legalPerson
			this.form.businessStatusName = data.businessStatusName
			this.form.tel = data.tel
			this.form.fax = data.fax
			this.form.eMail = data.eMail
			this.form.webSite = data.webSite
			this.form.remark = data.remark
		},
	}
}
</script>

<style>
</style>
